pp108 : Invoking a Web service in Rules

Invoking a Web service in Rules

This topic describes the procedure to invoke a Web service using the rule engine.

Before you begin this task:


Process Platform also provides a set of Web service interfaces, each of which can be used for various transactions on the back-end. You can view and manage the existing Web service interfaces and Web service operations, and can also generate default Web service operations and build custom Web service operations for databases. You can invoke these Web service operations while defining rule actions on a database template.

  1. Depending upon how you access a document, creating a rule and accessing the business object can be done in various ways. Refer to Accessing the Rule Modeler for more information.
  2. Set the properties of the rule on the Properties tab. For more information on the various fields on the rule properties interface, refer to properties of a rule.
  3. Click the Behavior tab to define the rule's behavior. For more information, refer to Defining Rule Behavior.
  4. To invoke a Web service, do the following:
    1. In the Rule Definition pane, right-click then > Actions > Invoke Web service.
    2. Type the name of the action in the Action Name text box. For more information on naming the action, refer to Guidelines for Naming Rule Actions.
    3. Click on the rule modeler tool bar. A Quick Access Menu is displayed.
    4. Click Insert on the sidebar. All the related artifacts are displayed on the Quick Access Menu.
    5. Drag the required Web service from the Quick Access Menu to the Action - Invoke WebService section. The Action - Invoke WebService pane is populated with the Method Name. The request based on the WSDL is displayed in the Request text box below.


      Note: When attaching an external service, you can view the header details of the method by clicking Header tab, if required.


    6. Click Add. The type of action along with the name is displayed next to then in the Rule Definition pane.
  5. Click .

    A rule is defined on the template that invokes a Web service. Repeat the task to add more Web service actions to the rule.

Related tasks

Triggering a Business Process from Rules
Triggering Rules from a Business Process Model
Using a Business Rule in an XForm
Using WS-AppServer Business Logic in XForms